Skip to main content
Version: Staging

MarRiskControlTkOverride

V8 Message Definiton

MarRiskControlTkOverride records are used to establish ticker-specific risk controls SpiderRock execution engines. These records are only viewable and editable by users belonging to the same riskFirm as the control records.

METADATA

AttributeValue
Topic4535-risk-control
MLink TokenSystemData
ProductSRControl
accessTypeSELECT,UPDATE,INSERT,DELETE

Table Definition

FieldTypeKeyDefault ValueComment
riskFirmVARCHAR(16)PRI''
riskGroupVARCHAR(16)PRI''
ticker_atenum - AssetTypePRI'None'
ticker_tsenum - TickerSrcPRI'None'
ticker_tkVARCHAR(12)PRI''
isTestAccntenum - YesNoPRI'None'if Yes this control applies only to risk from test accnts
stkEnabledenum - MarState'None'
futEnabledenum - MarState'None'
optEnabledenum - MarState'None'
blockShortSalesenum - YesNo'None'block all short sales
orderMaxStkQtyINT0number of equity shares that can be bought or sold by a single parent order
orderMaxFutQtyINT0number of futures contracts that can be bought or sold by a single parent order
orderMaxOptQtyINT0number of option contracts that can be bought or sold by a single parent order
orderMaxStkDDeltaFLOAT0maximum abs mny per stock parent order ddelta 001 shares pointValue midPrc
orderMaxFutDDeltaFLOAT0maximum abs mny per future parent order ddelta 001 contracts pointValue midPrc
orderMaxOptDDeltaFLOAT0maximum abs mny per option parent order ddelta 001 contracts pointValue ABSde uMidPrc
stkCollarPctFLOAT0maximum user limit vs bidask price control
futCollarPctFLOAT0maximum user limit vs bidask price control
optCollarPctFLOAT0maximum user limit vs bidask price control
maxAccFutCnAbsINT0max absolute net accnt future contracts
maxDayFutCnBotINT0day future contracts bot
maxDayFutCnSldINT0day future contracts sld
maxDayFutCnAbsINT0max absolute net day future contracts
modifiedByVARCHAR(24)''
modifiedInenum - SysEnvironment'None'
timestampDATETIME(6)'1900-01-01 00:00:00.000000'

PRIMARY KEY DEFINITION (Unique)

FieldSequence
riskFirm1
riskGroup2
ticker_tk3
ticker_at4
ticker_ts5
isTestAccnt6

CREATE TABLE EXAMPLE QUERY

CREATE TABLE `SRControl`.`MsgMarRiskControlTkOverride` (
`riskFirm` VARCHAR(16) NOT NULL DEFAULT '',
`riskGroup` VARCHAR(16) NOT NULL DEFAULT '',
`ticker_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None',
`ticker_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','ESX','ANY','CXE','DXE','NXAM','NXBR','NXDUB','NXLS','NXLDN','NXML','NXMLT','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None',
`ticker_tk` VARCHAR(12) NOT NULL DEFAULT '',
`isTestAccnt` ENUM('None','Yes','No') NOT NULL DEFAULT 'None' COMMENT 'if Yes, this control applies only to risk from test accnts',
`stkEnabled` ENUM('None','Enable','Disabled','CloseOnly') NOT NULL DEFAULT 'None',
`futEnabled` ENUM('None','Enable','Disabled','CloseOnly') NOT NULL DEFAULT 'None',
`optEnabled` ENUM('None','Enable','Disabled','CloseOnly') NOT NULL DEFAULT 'None',
`blockShortSales` ENUM('None','Yes','No') NOT NULL DEFAULT 'None' COMMENT 'block all short sales',
`orderMaxStkQty` INT NOT NULL DEFAULT 0 COMMENT 'number of equity shares that can be bought or sold by a single parent order',
`orderMaxFutQty` INT NOT NULL DEFAULT 0 COMMENT 'number of futures contracts that can be bought or sold by a single parent order',
`orderMaxOptQty` INT NOT NULL DEFAULT 0 COMMENT 'number of option contracts that can be bought or sold by a single parent order',
`orderMaxStkDDelta` FLOAT NOT NULL DEFAULT 0 COMMENT 'maximum (abs) mny per stock parent order; ddelta = 0.01 * shares * pointValue * midPrc',
`orderMaxFutDDelta` FLOAT NOT NULL DEFAULT 0 COMMENT 'maximum (abs) mny per future parent order; ddelta = 0.01 * contracts * pointValue * midPrc',
`orderMaxOptDDelta` FLOAT NOT NULL DEFAULT 0 COMMENT 'maximum (abs) mny per option parent order; ddelta = 0.01 * contracts * pointValue * ABS(de) * uMidPrc',
`stkCollarPct` FLOAT NOT NULL DEFAULT 0 COMMENT 'maximum user limit vs bid/ask price control',
`futCollarPct` FLOAT NOT NULL DEFAULT 0 COMMENT 'maximum user limit vs bid/ask price control',
`optCollarPct` FLOAT NOT NULL DEFAULT 0 COMMENT 'maximum user limit vs bid/ask price control',
`maxAccFutCnAbs` INT NOT NULL DEFAULT 0 COMMENT 'max absolute (net) accnt future contracts',
`maxDayFutCnBot` INT NOT NULL DEFAULT 0 COMMENT 'day future contracts bot',
`maxDayFutCnSld` INT NOT NULL DEFAULT 0 COMMENT 'day future contracts sld',
`maxDayFutCnAbs` INT NOT NULL DEFAULT 0 COMMENT 'max absolute (net) day future contracts',
`modifiedBy` VARCHAR(24) NOT NULL DEFAULT '',
`modifiedIn` ENUM('None','Neptune','Pluto','V7_Stable','V7_Latest','Saturn','Venus','Mars','SysTest','V7_Current') NOT NULL DEFAULT 'None',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
PRIMARY KEY USING HASH (`riskFirm`,`riskGroup`,`ticker_tk`,`ticker_at`,`ticker_ts`,`isTestAccnt`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='MarRiskControlTkOverride records are used to establish ticker-specific risk controls SpiderRock execution engines. These records are only viewable and editable by users belonging to the same riskFirm as the control records.';

SELECT TABLE EXAMPLE QUERY

SELECT
`riskFirm`,
`riskGroup`,
`ticker_at`,
`ticker_ts`,
`ticker_tk`,
`isTestAccnt`,
`stkEnabled`,
`futEnabled`,
`optEnabled`,
`blockShortSales`,
`orderMaxStkQty`,
`orderMaxFutQty`,
`orderMaxOptQty`,
`orderMaxStkDDelta`,
`orderMaxFutDDelta`,
`orderMaxOptDDelta`,
`stkCollarPct`,
`futCollarPct`,
`optCollarPct`,
`maxAccFutCnAbs`,
`maxDayFutCnBot`,
`maxDayFutCnSld`,
`maxDayFutCnAbs`,
`timestamp`
FROM `SRControl`.`MsgMarRiskControlTkOverride`
WHERE
/* Replace with a VARCHAR(16) */
`riskFirm` = 'Example_riskFirm'
AND
/* Replace with a VARCHAR(16) */
`riskGroup` = 'Example_riskGroup'
AND
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`ticker_at` = 'None'
AND
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','ESX','ANY','CXE','DXE','NXAM','NXBR','NXDUB','NXLS','NXLDN','NXML','NXMLT','NXOS','NXP','EUREX','CEDX','ICEFE') */
`ticker_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`ticker_tk` = 'Example_ticker_tk'
AND
/* Replace with a ENUM('None','Yes','No') */
`isTestAccnt` = 'None';

UPDATE TABLE EXAMPLE QUERY

UPDATE `SRControl`.`MsgMarRiskControlTkOverride` 
SET
/* Replace with a ENUM('None','Enable','Disabled','CloseOnly') */
`stkEnabled` = 'None',
/* Replace with a ENUM('None','Enable','Disabled','CloseOnly') */
`futEnabled` = 'None',
/* Replace with a ENUM('None','Enable','Disabled','CloseOnly') */
`optEnabled` = 'None',
/* Replace with a ENUM('None','Yes','No') */
`blockShortSales` = 'None',
/* Replace with a INT */
`orderMaxStkQty` = 5,
/* Replace with a INT */
`orderMaxFutQty` = 5,
/* Replace with a INT */
`orderMaxOptQty` = 5,
/* Replace with a FLOAT */
`orderMaxStkDDelta` = 1.23,
/* Replace with a FLOAT */
`orderMaxFutDDelta` = 1.23,
/* Replace with a FLOAT */
`orderMaxOptDDelta` = 1.23,
/* Replace with a FLOAT */
`stkCollarPct` = 1.23,
/* Replace with a FLOAT */
`futCollarPct` = 1.23,
/* Replace with a FLOAT */
`optCollarPct` = 1.23,
/* Replace with a INT */
`maxAccFutCnAbs` = 5,
/* Replace with a INT */
`maxDayFutCnBot` = 5,
/* Replace with a INT */
`maxDayFutCnSld` = 5,
/* Replace with a INT */
`maxDayFutCnAbs` = 5,
/* Replace with a DATETIME(6) */
`timestamp` = '2022-01-01 12:34:56.000000'
WHERE
/* Replace with a VARCHAR(16) */
`riskFirm` = 'Example_riskFirm'
AND
/* Replace with a VARCHAR(16) */
`riskGroup` = 'Example_riskGroup'
AND
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`ticker_at` = 'None'
AND
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','ESX','ANY','CXE','DXE','NXAM','NXBR','NXDUB','NXLS','NXLDN','NXML','NXMLT','NXOS','NXP','EUREX','CEDX','ICEFE') */
`ticker_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`ticker_tk` = 'Example_ticker_tk'
AND
/* Replace with a ENUM('None','Yes','No') */
`isTestAccnt` = 'None';

INSERT TABLE EXAMPLE QUERY

INSERT INTO `SRControl`.`MsgMarRiskControlTkOverride`(
/* Replace with a VARCHAR(16) */
`riskFirm`,
/* Replace with a VARCHAR(16) */
`riskGroup`,
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`ticker_at`,
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','ESX','ANY','CXE','DXE','NXAM','NXBR','NXDUB','NXLS','NXLDN','NXML','NXMLT','NXOS','NXP','EUREX','CEDX','ICEFE') */
`ticker_ts`,
/* Replace with a VARCHAR(12) */
`ticker_tk`,
/* Replace with a ENUM('None','Yes','No') */
`isTestAccnt`,
/* Replace with a ENUM('None','Enable','Disabled','CloseOnly') */
`stkEnabled`,
/* Replace with a ENUM('None','Enable','Disabled','CloseOnly') */
`futEnabled`,
/* Replace with a ENUM('None','Enable','Disabled','CloseOnly') */
`optEnabled`,
/* Replace with a ENUM('None','Yes','No') */
`blockShortSales`,
/* Replace with a INT */
`orderMaxStkQty`,
/* Replace with a INT */
`orderMaxFutQty`,
/* Replace with a INT */
`orderMaxOptQty`,
/* Replace with a FLOAT */
`orderMaxStkDDelta`,
/* Replace with a FLOAT */
`orderMaxFutDDelta`,
/* Replace with a FLOAT */
`orderMaxOptDDelta`,
/* Replace with a FLOAT */
`stkCollarPct`,
/* Replace with a FLOAT */
`futCollarPct`,
/* Replace with a FLOAT */
`optCollarPct`,
/* Replace with a INT */
`maxAccFutCnAbs`,
/* Replace with a INT */
`maxDayFutCnBot`,
/* Replace with a INT */
`maxDayFutCnSld`,
/* Replace with a INT */
`maxDayFutCnAbs`,
/* Replace with a DATETIME(6) */
`timestamp`
)
VALUES(
'Example_riskFirm',
'Example_riskGroup',
'None',
'None',
'Example_ticker_tk',
'None',
'None',
'None',
'None',
'None',
5,
5,
5,
1.23,
1.23,
1.23,
1.23,
1.23,
1.23,
5,
5,
5,
5,
'2022-01-01 12:34:56.000000'
);

DELETE TABLE EXAMPLE QUERY

DELETE FROM `SRControl`.`MsgMarRiskControlTkOverride` 
WHERE
/* Replace with a VARCHAR(16) */
`riskFirm` = 'Example_riskFirm'
AND
/* Replace with a VARCHAR(16) */
`riskGroup` = 'Example_riskGroup'
AND
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`ticker_at` = 'None'
AND
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','ESX','ANY','CXE','DXE','NXAM','NXBR','NXDUB','NXLS','NXLDN','NXML','NXMLT','NXOS','NXP','EUREX','CEDX','ICEFE') */
`ticker_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`ticker_tk` = 'Example_ticker_tk'
AND
/* Replace with a ENUM('None','Yes','No') */
`isTestAccnt` = 'None';

Doc Columns Query

SELECT * FROM SRControl.doccolumns WHERE TABLE_NAME='MarRiskControlTkOverride' ORDER BY ordinal_position ASC;